const express = require('express')
const router = express.Router()
const UserControllers = require('../controllers/users')
const userControllers = new UserControllers()
const { auth } = require('../middle/auth')

router.post('', userControllers.signup)
router.get('', auth, userControllers.getUsers)
router.delete('', userControllers.deleteUser)
router.patch('', userControllers.editUser)
router.post('/signin', userControllers.signin)
router.get('/signout', userControllers.signout)
router.get('/isAuth', auth, userControllers.isAuth)
module.exports = router